<%@ page language="java" pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<title>私募基金1号</title>
<jsp:include page="com/meta.jsp"></jsp:include>
<link rel="stylesheet" href="<%=request.getContextPath()%>/wap/css/detail.css" />
</head>
<body>
  <noscript>
    <div id="noscript">您当前的浏览器不支持JavaScript脚本</div>
  </noscript>
 
  <section class="container">
    <div class="logo">
      <img alt=""  src="images/icon_title_pic.png">
      <div class="texts">
        <div class="name">私募基金1号<em class="status">募集中</em></div>
        <div class="comment star4half"></div>
        <div class="earning">
          <span class="fl">预期收益</span>
          <span class="f-x">10%~20%</span>
        </div>
      </div>     
    </div>
    <div class="title-txt clearfix">
      <div class="title">
        <div class="item">投资起点</div>
        <div class="item">投资期限</div>
        <div class="item">运作方式</div>
      </div>
      <div class="content">
        <div class="item yellow">200万元</div>
        <div class="item">24个月</div>
        <div class="item">封闭式</div>     
      </div>
    </div>
    <div class="block-empty"></div>
    <div class="block-item yellow">
      <div class="block-title">基金业绩</div>
      <div class="chart-title">
        <div>时间：<em class="time">2015-03-01</em></div>
        <div>单位净值：<em class="data">3.82%</em></div>
      </div>
      <div id="chart" style="width: 100%; height: 2rem;"></div>
      <div class="chart-choice">
        <div class="item active">近一月</div>
        <div class="item">近三月</div>
        <div class="item">近六月</div>
        <div class="item">近一年</div>
      </div>
    </div>
    <div class="block-empty"></div>
    <div class="block-item red">
      <div class="block-title">基本信息</div>
      <div class="block-line clearfix">
        <div class="item">基金规模</div>
        <div class="item right">3亿元</div>
        <div class="item">递增金额</div>
        <div class="item right">10000元</div>
      </div>
      <div class="block-line last clearfix">
        <div class="item">托管银行</div>
        <div class="item right">中国银行</div>
        <div class="item">认购费率</div>
        <div class="item right">1%</div>
      </div>
    </div>
    <div class="block-empty"></div>
    <div class="block-item blue">
      <div class="block-title ">收益分配</div>
      <div class="thead clearfix">
        <div class="item">档次</div>
        <div class="item">份额</div>
        <div class="item">收益</div>
      </div>
      <div class="tbody">
        <div class="tr clearfix">
          <div class="tb">初级档</div>
          <div class="tb">100万~300万</div>
          <div class="tb">5%</div>
        </div>
        <div class="tr clearfix">
          <div class="tb">中级档</div>
          <div class="tb">300万~500万</div>
          <div class="tb">9%</div>
        </div>
        <div class="tr clearfix">
          <div class="tb">高级档</div>
          <div class="tb">500万~1000万</div>
          <div class="tb">10%</div>
        </div>
      </div>    
    </div>
    <div style="width: 100%;height: 30px"></div>
  </section>
  
  
<jsp:include page="com/footer-js.jsp"></jsp:include>
<script src="js/lib/highcharts.js"></script> 
<script>
function createCharts(){
    $('#chart').highcharts({
        chart: {
            type: 'area'
        },
        title: {
            text: ' '
        },
        xAxis: {
            categories: ['2015-01-09', '2015-02-09', '2015-03-09', '2015-04-09', '2015-05-09', '2015-06-09'],
            gridLineColor: '#e5e5e5',
            gridLineWidth: 1,
            lineWidth: 0,
            //刻度线的宽度
            tickWidth: 0,
            labels: {
            	  align: 'left',
                style: {
                    color: '#999'
                },             
                step: 2,
                staggerLines: 1
            }
        },
        yAxis: {
            title: {
                enabled: false
            },
            plotLines: [{
                value: 0,
                width: 2
            }],
            gridLineColor: '#e5e5e5',
            gridLineWidth: 1,
            gridLineDashStyle: 'longdash',
            lineWidth: 0,
            labels: {
                format: '{value}',
                style: {
                    color: '#999'
                }
            }
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0,
            enabled: false
        },
        plotOptions: {
            series: {
                fillColor: {
                    linearGradient: { x1: 0, y1: 1, x2: 0, y2: 0 },
                    stops: [
                        [0, 'rgba(255, 255, 255, .5)'],
                        [1, '#ffeece']
                    ]
                }

            }
        },
       
        series: [{
            data: [1.5, 2.5, 4.5, 3.1 , 3.9, 5.9],
            zIndex: 1,
            color: '#ffad10',
            marker: { 
                fillColor: 'white',
                radius: 3,
                lineWidth: 2,
                lineColor: '#ffad10',
                states: {
                    hover: {
                        fillColor: '#ffad10',
                        radius: 4
                    }
                }
            }
        }],
        navigation: {
            buttonOptions: {
                enabled: false
            }
        },
        exporting: {
            enabled: false
        },
        credits: {
            enabled: false
        },
        tooltip: {
            valueSuffix: '万',
            backgroundColor: '#ffeece',
            style: {
                color: '#ffad10'
            },
            formatter: function() {
                return this.y + '万</b>';
            }
        }
    });
}
createCharts();
$('.chart-choice .item').on('click', function(e) {
	  e.preventDefault();
	  if (!$(this).hasClass('active')) { // 本来就是选中的了 那没有必要改变
	      $('.chart-choice .item').removeClass('active'); //循环所有的item，然后removeClass('active')
	      $(this).addClass('active');
	      createCharts();
	    } else {
	      $(this).removeClass('active'); // 取消选中
	   }
	});
</script>
</body>
</html>